package com.worktool;

import org.springframework.web.client.RestTemplate;

import java.util.Set;

/**
 * RestExecutor 调用restTemplate
 * */
public class RestExecutor {
	
	/**
	 * 初始化 RestTemplate
	 * */
	private static class ExecutorHolder {
		private static RestTemplate rest = new RestTemplateConfig().restTemplate();
	}
	
	/**
	 * 构造
	 * */
	public static RestTemplate build() {
		return ExecutorHolder.rest;
	}

	public static RestTemplate buildNew() {
		return new RestTemplateConfig().restTemplate();
	}


}
